package br.affero.web.controller;

import org.jboss.seam.faces.rewrite.FacesRedirect;
import org.jboss.seam.faces.rewrite.UrlMapping;
import org.jboss.seam.faces.security.AccessDeniedView;
import org.jboss.seam.faces.security.LoginView;
import org.jboss.seam.faces.view.config.ViewConfig;
import org.jboss.seam.faces.view.config.ViewPattern;

import br.affero.core.security.annotations.User;

@ViewConfig
public interface TutorialViewConfig {

	static enum Pages {
		
		@UrlMapping(pattern = "/person/list/")
		@ViewPattern("/pages/person/list.xhtml")
		@User
		PERSON_LIST,

		@UrlMapping(pattern = "/person/detail/#{personId : personHome.personId}/")
        @ViewPattern("/pages/person/detail.xhtml")
		@User
        PERSON_DETAIL,
		
        @UrlMapping(pattern = "/person/edit/#{personId : personHome.personId}/")
        @ViewPattern("/pages/person/edit.xhtml")
		@User
        PERSON_EDIT,
        
        @FacesRedirect
        @ViewPattern("/*")
		@AccessDeniedView("/accessDenied.xhtml")
        @LoginView("/login.xhtml")
        ALL
    }
	
	
}
